/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.tests;

import br.ufba.lasid.comm.Host;
import br.ufba.lasid.jitclouds.mda.JiTContext;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author aliriosa
 */
public class TContext {
    public static void main(String[] args) throws Exception{
        List hosts = JiTContext.getConfiguration().getList("JiTFailureDetector.hosts", new ArrayList());
     
        for(Object host : hosts){            
            
            String haddr = (String) host;
            
            System.out.println(haddr + " is localhost (" + Host.isLocalAddress(haddr) + ")");        
            
        }
        
        hosts = JiTContext.getConfiguration().getList("JiTReplicationManager.hosts", new ArrayList());
     
        for(Object host : hosts){            
            
            String haddr = (String) host;
            
            System.out.println(haddr + " is localhost (" + Host.isLocalAddress(haddr) + ")");        
            
        }
    }
}
